package ocbn.remotelab.events;

/**
 * This class represents a connection event, fired by PacketProcessor
 * to indicate any error has happened in the connection, or what is the
 * PacketProcessor is now doing.
 * ConnEvent will only be fired out when the connection state changes.
 */
public class ConnStateEvent extends Event {

    /**
     * Construct a connection event by giving the type of the event and 
     * the details as Strings.
     * @param type the type of the event, as is specified in the wiki.
     * @param details the detailed information of the event.
     */ 
    public ConnStateEvent (String name, String details){

        super();
        //all info about state is important
        boolean isImportant =
                  name.equals("CONNECTED")
                || name.equals("DISCONNECTED");

        super.setImportance(isImportant);
        super.setName(name);
        super.setDetails(details);
    }



}
